home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / TTY.ARJ / TTY.H < prev    next >
C/C++ Source or Header  |  1992-03-11  |  735b  |  58 lines

  1. //    Written by Chris Sokol
  2.  
  3. #ifndef TTY_H
  4. #define TTY_H    1
  5.  
  6. #include "ttyio.h"
  7.  
  8. class    TTY
  9. {
  10.     uint    baud;
  11.     int    error,
  12.             handle;
  13.     uchar    linctl,
  14.             linstat,
  15.             mdmctl,
  16.             mdmstat;
  17.     int    outlinc: 1,
  18.             outmdmc: 1;
  19.     uint    *rxbuf,
  20.             rxlen,
  21.             *txbuf,
  22.             txlen;
  23.  
  24. public:
  25.             TTY(char *name, uint rxlen, uint txlen);
  26.             ~TTY();
  27.  
  28.     int    Error();
  29.     int    Opened();
  30.  
  31.     int    Baud(ulong baud);
  32.     int    Bits(uint bits);
  33.     int    Brk(int on);
  34.     int    Prty(char p);
  35.     int    Stop(uint bits);
  36.     int    XOnOff(int ena);
  37.     int    WaitCTS(int ena);
  38.  
  39.     int    DTR(int dtr);
  40.     int    RTS(int rts);
  41.  
  42.     void    FlushCtl();
  43.  
  44.     int    CTS();
  45.     int    DSR();
  46.     int    RING();
  47.     int    RLSD();
  48.  
  49.     int    Avail();
  50.     uint    Get();
  51.  
  52.     int    Put(uchar c);
  53.  
  54.     int    Done();
  55. };
  56.  
  57. #endif
  58.